<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1">
  <title></title>
  <script type="text/javascript" src="/assets/js/def.js"></script>
  <script src="/assets/lib/underscore/underscore-min.js"></script>
  <script type="text/javascript" src="/hy5b/math/index.js"></script>
  <script type="text/javascript" src="/hy5b/frontend/util.js"></script>
  <script type="text/javascript" src="index.js"></script>
  <script type="text/javascript" src="line.js"></script>
  <script type="text/javascript" src="hline.js"></script>
</head>

<body>
  <canvas id="canvas" width="800" height="600"></canvas>
  <script>
  var rotation = 0;
  window.setInterval(function() {
    rotation += 3;

    $('#canvas').draw({
      fn: function(ctx) {
        ctx.fillStyle = 'rgba(0, 0, 0, .1)';
        ctx.fillRect(0, 0, $(this).width(), $(this).height());
      }
    }).drawHLine({
      x: 300,
      y: 300,
      rotation: rotation
    }).drawText({
      fillStyle: '#9cf',
      strokeStyle: '#25a',
      strokeWidth: 2,
      x: 150, y: 100,
      fontSize: 48,
      fontFamily: 'Verdana, sans-serif',
      text: 'Hello'
    }).drawLine({
      points: [[120, 23], [234, 23]]
    });
  }, 1000 / 60);
  </script>
</body>

</html>
